package org.chen.wordwave.act.game;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.Nullable;

import org.chen.wordwave.R;
import org.chen.wordwave.base.BaseActivity;
import org.chen.wordwave.tools.user.UserUtils;

public class GameSelection extends BaseActivity {
    private ImageView iv_game1,iv_game2,iv_game3;
    private TextView tv_title;

    @Override
    public Integer getLayoutResId() {
        return R.layout.choose_game_act;
    }

    @Override
    public void init() {
        iv_game1 = findViewById(R.id.iv_game1);
        iv_game2 = findViewById(R.id.iv_game2);
        iv_game3 = findViewById(R.id.iv_game3);
        tv_title = findViewById(R.id.tv_title);

        tv_title.setText(R.string.select_game);

        iv_game1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                openGame1(v);
            }
        });

        iv_game2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                openGame2(v);
            }
        });
        iv_game3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                openGame3(v);
            }
        });
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    public void openGame2(View view) {
        Intent intent = new Intent(this, Game.class);
        startActivity(intent);
    }

    public void openGame1(View view) {
        Intent intent = new Intent(this, Lucky.class);
        startActivity(intent);
    }

    public void openGame3(View view) {
        Intent intent = new Intent(this, FootballWordGame.class);
        startActivity(intent);
    }
}
